package com.wedo.mall.dialog;

import android.content.Context;
import android.content.Intent;

import com.e.library.dialog.EDialog;
import com.wedo.mall.R;
import com.wedo.mall.activity.register.RegisterActivity;

import butterknife.OnClick;

/**
 * Created by e on 2017/8/5.
 */

public class WelcomeDialog extends EDialog {

    public static WelcomeDialog with(Context context){
        return new WelcomeDialog(context);
    }

    public WelcomeDialog(Context context) {
        super(context);
    }

    @Override
    protected int layout() {
        return R.layout.dialog_welcome;
    }

    @Override
    protected void onDialogCreated(Context context) {

    }

    @OnClick({R.id.tv_tourist,R.id.ll_root})
    protected void onDismissClick(){
        dismiss();
    }

    @OnClick(R.id.tv_register)
    protected void onRegisterClick(){
        Intent intent = new Intent(getContext(), RegisterActivity.class);
        getContext().startActivity(intent);
        dismiss();
    }


}
